<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserCarTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_car', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("user_id")->default(0)->comment("用户ID");
            $table->char("car_type",2)->default('')->comment("车辆类型");
            $table->string("city",5)->default('')->comment("车牌前两位，如：浙A");
            $table->char("number",6)->default('')->comment("车牌后几位");
            $table->string("engine_number",20)->default('')->comment("发动机号");
            $table->char("vin",6)->default('')->comment("车架后6位");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_car');
    }
}
